<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>回文检测器</title>
</head>

<body>
    <script>
        /* 
            使用双向队列思维实现
        */
        let palindromeCheck = function (word) {
            let word_arr = Array.from(String(a).split(""));
            while (word_arr.length > 1) {
                if (word_arr.pop() === word_arr.shift()) {
                    continue;
                } else {
                    return false;
                }
            }
            return true;
        }
        console.log(palindromeCheck("abjcajaajacjba"));
    </script>
</body>

</html>